Skip to content

Conversation

@amyschools
Copy link
Contributor

What's in this PR?

Add api_case.ex helper functions to Category controller tests.

References

Closes #427

Progress on: #413

conn |> put(path, payload)
end

test "lists all entries on index", %{conn: conn} do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this is missing describe "index" do

category = Repo.get_by(Category, @valid_attrs)
assert category
assert response["data"]["id"] == "#{category.id}"
assert conn |> request_update(@valid_attrs) |> json_response(200)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the organization membership update test:

organization = insert(:organization)
membership = insert(:organization_membership, organization: organization, role: "pending")
insert(:organization_membership, organization: organization, member: current_user, role: "owner")

  `assert conn |> request_update(membership, @valid_attrs) |> json_response(200)`

Should I change it to look more like this one? Looks like the request_update helper has a default_record.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, because you do need someone who's an organization admin to approve, right?

@joshsmith
Copy link
Contributor

@amyschools that commit message is a little unclear.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 94.184% when pulling de38021 on 427-category-controller-test into ef84323 on develop.

@amyschools amyschools force-pushed the 427-category-controller-test branch from de38021 to e623364 Compare November 3, 2016 23:54
@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 94.184% when pulling e623364 on 427-category-controller-test into ef84323 on develop.

@amyschools amyschools force-pushed the 427-category-controller-test branch from e623364 to 7c35183 Compare November 4, 2016 16:43
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 93.851% when pulling 7c35183 on 427-category-controller-test into e64eab9 on develop.

@amyschools amyschools merged commit 604f6df into develop Nov 4, 2016
@amyschools amyschools deleted the 427-category-controller-test branch November 4, 2016 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants